package exsun.jt808.data.media.operate.encode.codec;

import exsun.jt808.data.media.data.MediaConfig;
import exsun.jt808.data.media.operate.codec.G711Codec;

/**
 * pcm转g711a
 */
public class PcmToG711aCodec implements CodecBase {
    private G711Codec g711Codec = new G711Codec();
    @Override
    public void init(MediaConfig config, String clientChannelId) {
    }

    @Override
    public byte[] decode(String clientChannelId, byte[] data) {
        return g711Codec.fromPCM(data);
    }

    @Override
    public void release(String clientChannelId) {

    }
}
